package jp.ne.hatena.d.digitalsoul.warikan.roles

import java.util.Date

import jp.ne.hatena.d.digitalsoul.warikan.models._

trait Planner {
	
	val id:String
	
	var name:String
	
	var schedule:Date
	
	var location:String
	
	var participants:Map[String, Participant]
	
	def setup(name:String, schedule:Date, location:String) {
		this.name = name
		this.schedule = schedule
		this.location = location
	}
	
	def addParticipant(participant:Participant) = 
		participants += (participant.name -> participant)
	
	def number:Int = participants.size

}